﻿using IPCMessage;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace KInterfaces
{
    /// <summary>
    /// 页面跳转事件
    /// </summary>
    public class PageChangedEventArgs : EventArgs
    {
        /// <summary>
        /// 跳转类型
        /// </summary>
        public readonly PageTo Direction;

        public PageChangedEventArgs(PageTo dir)
        {
            Direction = dir;
        }
    }

    /// <summary>
    /// 页面切换事件
    /// </summary>
    public class PageSwitchedEventArgs : EventArgs
    {
        /// <summary>
        /// 目标页面名称
        /// </summary>
        public readonly string PageName;

        public PageSwitchedEventArgs(string name)
        {
            PageName = name;
        }
    }

    /// <summary>
    /// 模块跳转消息
    /// </summary>
    public class ModuleChangedEventArgs : EventArgs
    {
        /// <summary>
        /// 跳转/切换类型
        /// </summary>
        public readonly ModuleAppTo Direction;

        public ModuleChangedEventArgs(ModuleAppTo dir)
        {
            Direction = dir;
        }
    }

    /// <summary>
    /// 模块切换消息
    /// </summary>
    public class ModuleSwitchedEventArgs : EventArgs
    {
        /// <summary>
        /// 跳转/切换类型
        /// </summary>
        public readonly string ModuleName;

        public ModuleSwitchedEventArgs(string name)
        {
            ModuleName = name;
        }
    }

    /// <summary>
    /// 执行管理员动作消息
    /// </summary>
    public class AdministratorActionTakenEventArgs : EventArgs
    {
        /// <summary>
        /// 管理员动作
        /// </summary>
        public readonly AdministratorAction Action;

        public AdministratorActionTakenEventArgs(AdministratorAction action)
        {
            Action = action;
        }
    }

    /// <summary>
    /// 业务状态变化通知消息
    /// </summary>
    public class JobStateChangedEventArgs : EventArgs
    {
        /// <summary>
        /// 管理员动作
        /// </summary>
        public readonly KJob Job;

        public JobStateChangedEventArgs(KJob job)
        {
            Job = job;
        }
    }

    /// <summary>
    /// 客户端向另一个进程服务器发送请求通知
    /// </summary>
    public class ClientRequestSentEventArgs : EventArgs
    {
        /// <summary>
        /// 请求消息
        /// </summary>
        public readonly IPCRequestMessage Message;

        public ClientRequestSentEventArgs(IPCRequestMessage msg)
        {
            Message = msg;
        }
    }

    /// <summary>
    /// 当前工作页面提示信息更新时间
    /// </summary>
    public class PageTipsUpdatedEventArgs : EventArgs
    {
        /// <summary>
        /// 请求消息
        /// </summary>
        public readonly string Tip;

        /// <summary>
        /// 请求消息
        /// </summary>
        public readonly float FontSize;

        public PageTipsUpdatedEventArgs(string msg, float size)
        {
            Tip = msg;
            FontSize=size;
        }
    }
}
